﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using CSM.Models;
using CSM.Controllers;
using System.Collections.Generic;

namespace CSM.Controllers
{
    public class SessionTrans
    {
        private CustomDataContext db = new CustomDataContext();
        //将Session转换
        public string TranstoFalse(string appsecret ,string session)
        {
            string second = appsecret.Substring(1,1);
            string FalseSession = session.Insert(9, second);
            return FalseSession;
        }
        //转出真实的Session
        public string TranstoTrue(string session)
        {
            string TrueSession = session.Substring(1, 8) + session.Substring(10);
            return TrueSession;

        }
    }
}
